package com.yang.biz.modular.post.enums;

import lombok.Getter;

/**
 * 数据类型
 *
 * @author: yangjianzhi
 * @version1.0
 */
@Getter
public enum InstrumentDataTypeEnum {
    /**
     *
     */
    Water(1, ""),
    Soil(2, ""),
    Atmosphere(3, ""),
    Organism(4, ""),
    Other(5, "");

    private int key;
    private String title;

    InstrumentDataTypeEnum(int key, String title) {
        this.key = key;
        this.title = title;
    }

    public static boolean valid(int value) {
        return Water.getKey() == value ||
                Soil.getKey() == value ||
                Atmosphere.getKey() == value ||
                Organism.getKey() == value ||
                Other.getKey() == value;
    }
}
